package com.smbms.service;

import java.util.List;
import java.util.Set;

import com.smbms.entity.SmbmsUser;
import com.smbms.entity.page.Page;

public interface UserService {

	/**
	 * 分页查询用户
	 * @param userName
	 * @param userRole
	 * @param pageNo
	 * @param pageSize 
	 * @return
	 */
	Page<SmbmsUser> selectUserByPage(String userName, Integer userRole,Integer pageNo, Integer pageSize);
	
	int addUser(SmbmsUser user);
	
	SmbmsUser login(String userCode,String userPassword);

	SmbmsUser getUserById(Long id);

	int updateUser(SmbmsUser user);

	/**
	 * 查询用户名是否存在
	 * @param userCode
	 * @return
	 */
	int checkUserCode(String userCode);

	SmbmsUser findByUsername(String username);

	//用户对应的角色
	Set<String> findRoles(String username);

	//用户对应权限
	Set<String> findPermissions(String username);
}
